﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DataObjectLayer
{
    public class CategoryDOL
    {
        public const string Select = @"SELECT CATEGORYID, CATEGORYTITLE, DESCRIPTION FROM TEST.CATEGORY";
        public const string Insert = @"INSERT INTO TEST.CATEGORY(CATEGORYTITLE,DESCRIPTION) VALUES (@CategoryTitle,@Description)";
        public const string SelectComboBox = @"SELECT CATEGORYID, CATEGORYTITLE FROM TEST.CATEGORY UNION (SELECT VALUE AS CATEGORYID, TEXT AS CATEGORYTITLE FROM Common.NOSELECTION)";
        public const string Delete = "DELETE FROM TEST.CATEGORY WHERE CATEGORYID=@CategoryId";
        public const string Update = "UPDATE TEST.CATEGORY SET CATEGORYTITLE = @CategoryTitle ,DESCRIPTION = @Description WHERE CATEGORYID = @CategoryId";
        public const string SelectMaxId = "SELECT ISNULL(MAX(CATEGORYID),0)+1 AS MAX_CATEGORY_ID FROM TEST.CATEGORY";
        public enum QueryStatus { Select,SelectComboBox, Insert, Delete, Update, SelectMaxId };
    }
}
